<template>
  <div style="padding: 0 17px">
    <Breadcrumb/>
    <div style="display: flex;margin-top: 15px;">
      <el-date-picker
          style="margin-right: 15px;font-size: 13px"
          v-model="value1"
          type="date"
          placeholder="选择日期">
      </el-date-picker>
      <el-date-picker
          style="margin-right: 15px;font-size: 13px"
          v-model="value2"
          type="date"
          placeholder="选择日期">
      </el-date-picker>
      <el-select style="margin-right: 15px;width: 200px;font-size: 13px">

      </el-select>
      <el-input v-model="search" placeholder="设备名称、设备识别码、分路名称" style="width: 200px;height: 33px;margin-right: 15px;font-size: 13px;" clearable></el-input>
      <el-button type="primary" style="font-size: 12px;margin-right: 5px" @click="load">搜索</el-button>
    </div>
    <div>
      <el-table :data="tableData" border style="width: 100%;margin-top: 20px;color: #909399;font-size: 12px;">
        <el-table-column prop="time" label="设备名称" />
        <el-table-column prop="age" label="设备识别码" />
        <el-table-column prop="age" label="设备地点" />
        <el-table-column prop="name" label="分路名称" />
        <el-table-column prop="age" label="故障类型" />
        <el-table-column prop="age" label="故障次数" />
      </el-table>

      <el-pagination
          :current-page="currentPage"
          :page-size="pageSize"
          :page-sizes="[10, 20, 30, 50]"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
          :background="true"

          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
      />
    </div>
  </div>
</template>

<script>
import Breadcrumb from "@/components/Breadcrumb.vue";

export default {
  name: "FaultStatistics",
  components: {Breadcrumb},
  data() {
    return{
      search: '',
      tableData: [],
      currentPage: 1,
      pageSize: 10,
      total: 10,
    }
  },
  methods: {
    // 搜索
    load(){

    },
    handleSizeChange(pageSize) {   // 改变当前每页的个数触发
      this.pageSize = pageSize
      this.load()
    },
    handleCurrentChange(pageNum) {  // 改变当前页码触发
      this.currentPage = pageNum
      this.load()
    },
  }
}
</script>

<style scoped>
:deep(.el-table th .cell)  {
  font-weight: 700
}
:deep(.el-select-dropdown__item)  {
  font-size: 14px;
}
:deep(.el-select__wrapper) {
  font-size: 14px;
}
</style>
